window: Lower the visible focus timeout
authorMatthias Clasen <mclasen@redhat.com>
Tue, 5 May 2020 14:37:10 +0000 (10:37 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 5 May 2020 14:45:47 +0000 (10:45 -0400)
Five seconds felt too long for some people in
initial feedback, so lets lower the timeout to
3 seconds.

gtk/gtkwindow.c

index fbf0a065b7ba3623b4f34aa956b35c452d6ab2ea..eedbabd17c6d198ff8c36001399e118918f742f1 100644 (file)
 #define MENU_BAR_ACCEL GDK_KEY_F10
 #define RESIZE_HANDLE_SIZE 20
 #define MNEMONICS_DELAY 300 /* ms */
-#define NO_CONTENT_CHILD_NAT 200
+#define NO_CONTENT_CHILD_NAT 200 /* ms */
+#define VISIBLE_FOCUS_DURATION 3 /* s */
+
+
 /* In case the content (excluding header bar and shadows) of the window
  * would be empty, either because there is no visible child widget or only an
  * empty container widget, we use NO_CONTENT_CHILD_NAT as natural width/height
@@ -7470,7 +7473,7 @@ gtk_window_set_focus_visible (GtkWindow *window,
     }
 
   if (priv->focus_visible)
-    priv->focus_visible_timeout = g_timeout_add_seconds (5, unset_focus_visible, window);
+    priv->focus_visible_timeout = g_timeout_add_seconds (VISIBLE_FOCUS_DURATION, unset_focus_visible, window);
 
   if (changed)
     {